/**
 * 动态表单配置文件
 * 为 elfrom/checkform.vue 组件提供配置示例
 */

// 示例表单配置
export const formConfigExample = [
  {
    gutter: 20,
    justify: 'start',
    columns: [
      {
        prop: 'name',
        label: '姓名',
        type: 'input',
        span: 12,
        placeholder: '请输入姓名'
      },
      {
        prop: 'email',
        label: '邮箱',
        type: 'input',
        span: 1,
        placeholder: '请输入邮箱'
      }
    ]
  },
  {
    gutter: 20,
    justify: 'start',
    columns: [
      {
        prop: 'bio',
        label: '个人简介',
        type: 'textarea',
        span: 24,
        placeholder: '请输入个人简介',
        rows: 4
      }
    ]
  },
  {
    gutter: 20,
    justify: 'start',
    columns: [
      {
        prop: 'gender',
        label: '性别',
        type: 'select',
        span: 12,
        placeholder: '请选择性别',
        options: [
          { label: '男', value: 'male' },
          { label: '女', value: 'female' },
          { label: '其他', value: 'other' }
        ]
      },
      {
        prop: 'hobbies',
        label: '爱好',
        type: 'select',
        span: 12,
        placeholder: '请选择爱好',
        multiple: true,
        options: [
          { label: '阅读', value: 'reading' },
          { label: '游泳', value: 'swimming' },
          { label: '跑步', value: 'running' },
          { label: '电影', value: 'movie' }
        ]
      }
    ]
  },
  {
    gutter: 20,
    justify: 'start',
    columns: [
      {
        prop: 'birthDate',
        label: '出生日期',
        type: 'date',
        span: 12,
        placeholder: '请选择出生日期',
        format: 'YYYY-MM-DD'
      },
      {
        prop: 'registrationDate',
        label: '注册时间',
        type: 'datetime',
        span: 12,
        placeholder: '请选择注册时间',
        format: 'YYYY-MM-DD HH:mm:ss'
      }
    ]
  },
  {
    gutter: 20,
    justify: 'start',
    columns: [
      {
        prop: 'contractPeriod',
        label: '合同期间',
        type: 'daterange',
        span: 12,
        startPlaceholder: '开始日期',
        endPlaceholder: '结束日期',
        format: 'YYYY-MM-DD'
      },
      {
        prop: 'activityTime',
        label: '活动时间',
        type: 'datetimerange',
        span: 12,
        startPlaceholder: '开始时间',
        endPlaceholder: '结束时间',
        format: 'YYYY-MM-DD HH:mm:ss'
      }
    ]
  },
  {
    gutter: 20,
    justify: 'start',
    columns: [
      {
        prop: 'avatar',
        label: '头像',
        type: 'upload',
        span: 12,
        buttonText: '上传头像',
        accept: 'image/*'
      }
    ]
  }
];

// 表单数据示例
export const formDataExample = {
  name: '张三',
  email: 'zhangsan@example.com',
  bio: '热爱技术，喜欢探索新事物。',
  gender: 'male',
  hobbies: ['reading', 'swimming'],
  birthDate: '1990-01-01',
  registrationDate: '2023-01-01 12:00:00',
  contractPeriod: ['2023-01-01', '2024-01-01'],
  activityTime: ['2023-06-01 09:00:00', '2023-06-01 18:00:00'],
  avatar: 'avatar.jpg'
};

export default {
  formConfigExample,
  formDataExample
};